package com.tianji.remark.service;

import com.tianji.remark.domain.dto.LikeRecordFormDTO;
import com.tianji.remark.domain.po.LikedRecord;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * <p>
 * 点赞记录表 服务类
 * </p>
 *
 * @author 蒼飞
 * @since 2023-09-12
 */
public interface LikedRecordService extends IService<LikedRecord> {
    /**
     * 点赞或者取消点赞
     * @param recordFormDTO
     */
    void addLikeRecord(LikeRecordFormDTO recordFormDTO);

    /**
     * 批量查询点赞状态
     * @param bizIds
     * @return
     */
    List<Long> isBizLiked(List<Long> bizIds);

    /**
     * 根据业务id查询点赞状态
     * @param id
     * @return
     */
    Long isBizLikedOne(Long id);

    /**
     * 定时任务 将点赞通过mq通知其他服务
     * @param bizType
     * @param maxSize
     */
    void readLikedTimesAndSendMessage(String bizType,Integer maxSize);
}
